<!DOCTYPE html>
<%@ page language="java" errorPage="/error.jsp" pageEncoding="UTF-8"
	contentType="text/html;charset=utf-8"%>
<html>
<head>
<title>服务器监控</title>
<jsp:include page="/common/head.jsp"></jsp:include>
</head>
<body class="iframe-page">
	<div class="page-title-wrapper">
    <div class="page-title">
        <div class="page-title-text">
            <span>应用服务信息</span>
        </div>
    </div>
    <div class="page-title-border"></div>
</div>

		<div class="grid-row distance-top">
			<div class="col-6">
				<div class="summer-panel">
					<h3 class="distance-left">JVM内存信息</h3>
					<form id="jvmForm">
                    <table class="table-view auto-width noborder">
                        <col width="30%">
                        <col width="70%">
                        <tr>
                            <td class="td-title">Heap已分配</td>
                            <td name="heapTotal"></td>
                        </tr>
                        <tr>
                            <td class="td-title">Heap使用</td>
                            <td name="heapUsed"></td>
                        </tr>
                        <tr>
                            <td class="td-title">Heap最大</td>
                            <td name="heapMax"></td>
                        </tr>
                        <tr>
                            <td class="td-title">Non-Heap已分配</td>
                            <td name="nonheapTotal"></td>
                        </tr>
                        <tr>
                            <td class="td-title">Non-Heap使用</td>
                            <td name="nonheapUsed"></td>
                        </tr>
                        <tr>
                            <td class="td-title">Non-Heap最大</td>
                            <td name="nonheapMax"></td>
                        </tr>
                    </table>
              </form>
			     
			 </div>
			 </div>
			<div class="col-6" style="padding-left: 15px;">
			 <div class="summer-panel">
                    <h3 class="distance-left">用户及文件系统情况</h3>
                    <form id="userFileForm">
                    <table class="table-view auto-width noborder">
                        <col width="30%">
                        <col width="70%">
                        <tr>
                            <td class="td-title">系统用户</td>
                            <td name="userName"></td>
                        </tr>
                        <tr>
                            <td class="td-title">系统语言</td>
                            <td name="language"></td>
                        </tr>
                        <tr>
                            <td class="td-title">系统用户目录</td>
                            <td name="userHome"></td>
                        </tr>
                        <tr>
                            <td class="td-title">所属地区</td>
                            <td name="contry"></td>
                        </tr>
                        <tr>
                            <td class="td-title">文件编码</td>
                            <td name="fileEncoding"></td>
                        </tr>
                        <tr>
                            <td class="td-title">路径分隔符</td>
                            <td name="fileSparator"></td>
                        </tr>
                    </table>
			</form>
			</div>				
	</div>
	</div>
	
        <div class="grid-row distance-double">
            <div class="col-12">
                <div class="summer-panel">
                    <h3 class="distance-left">JAVA环境信息</h3>
                    <form id="javaForm">
                    <table class="table-view auto-width noborder">
                        <col width="15%">
                        <col width="70%">
                        <tr>
                            <td class="td-title">JAVA版本</td>
                            <td name="version"></td>
                        </tr>
                        <tr>
                            <td class="td-title">运行时版本</td>
                            <td name="rmVersion"></td>
                        </tr>
                        <tr>
                            <td class="td-title">运行时名称</td>
                            <td name="rmName"></td>
                        </tr>
                        <tr>
                            <td class="td-title">VM版本</td>
                            <td name="vmVersion"></td>
                        </tr>
                        <tr>
                            <td class="td-title">VM名称</td>
                            <td name="vmName"></td>
                        </tr>
                        <tr>
                            <td class="td-title">JAVA目录</td>
                            <td name="javaHome"></td>
                        </tr>
                         <tr>
                            <td class="td-title">JAVA Lib</td>
                            <td name="javaLib"></td>
                        </tr>
                         <tr>
                            <td class="td-title">JVM启动参数</td>
                            <td name="jvmParams"></td>
                        </tr>
                    </table>
            </form>
            </div>          
            
            </div>
        </div>
	

	<script>    
     	var basePath = '<%=request.getContextPath()%>';
		$(function() {
			$.ajax({
				type : 'GET',
				url : basePath + '/monitor/appInfo',
				dataType : 'json',
				success : function(data) {
					var result = data.javaEnv;
					$("#javaForm").form({}).form("loadDataView", {
						data : result
					});
					$("#userFileForm").form({}).form("loadDataView", {
						data : result
					});
				}
			});
			$.ajax({
				type : 'GET',
				url : basePath + '/monitor/jvmInfo',
				dataType : 'json',
				success : function(data) {
					var result = data.jvm;
					$("#jvmForm").form({}).form("loadDataView", {
						data : result
					});
				}
			});
		});

		
	</script>
</body>
</html>
